home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1995 October
/
EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso
/
Aminet
/
comm
/
net
/
amitcp2_x_gcc.lha
/
printfault.c
< prev
next >
Wrap
C/C++ Source or Header
|
1994-01-12
|
1KB
|
47 lines
char RCS_ID_PRINTFAULT_C[] = "$Id: printfault.c,v 1.5 1994/01/12 18:36:09 jasegler Exp jasegler $";
/*
* printfault.c --- Print a socket error message (DOS)
*
* Author: ppessi <Pekka.Pessi@hut.fi>
*
* Copyright © 1993 AmiTCP/IP Group, <amitcp-group@hut.fi>
* Helsinki University of Technology, Finland.
* All rights reserved.
*
* Created : Sat Mar 20 02:10:14 1993 ppessi
* Last modified: Fri Jun 4 02:05:44 1993 ppessi
*/
#include <errno.h>
#include <exec/execbase.h>
extern struct ExecBase *SysBase;
#include <dos/dos.h>
#include <dos/dosextens.h>
#if __SASC
#include <proto/dos.h>
#elif __GNUC__
#include <clib/dos_protos.h>
#endif
void
PrintNetFault (LONG code, const UBYTE * banner)
{
struct Process *p = (struct Process *) SysBase->ThisTask;
BPTR Stderr = p->pr_CES ? p->pr_CES : p->pr_COS;
FPuts (Stderr, (UBYTE *) banner);
FPuts (Stderr, ": ");
if (code < __sys_nerr)
banner = (UBYTE *) __sys_errlist[code];
else
banner = (UBYTE *) __sys_errlist[0];
FPuts (Stderr, (UBYTE *) banner);
FPuts (Stderr, "\n");
Flush (Stderr);
}